<template>
  <div>
    <div class="wraper">
      <div class="title">反馈明细</div>
      <el-button
        type="primary"
        onclick="window.history.back(-1);"
      >返回</el-button>
    </div>
    <div class="content">
      <ul>
        <li>
          <label for="">时间</label>
          {{ contentObj.createTime }}

        </li>
        <li>
          <label for="">平台</label>
          {{ ['','E-Broker','车E家'] [contentObj.source] }}
        </li>
        <li>
          <label for="">类型</label>
          {{ ['其他','买车','卖车','经纪人'][contentObj.type] }}

        </li>
        <li><label for="">用户名称</label>
          {{ contentObj.username }}
        </li>
        <li>
          <label for="">用户ID</label>
          {{ contentObj.userId }}
        </li>
        <li><label for="">联系电话</label>
          {{ contentObj.mobile }}
        </li>
        <li>
          <label for="">问题描述</label>
          <span style="display: inline-block; vertical-align: text-top">
            {{ contentObj.description }}
          </span>
        </li>
        <li>
          <label for="">图片</label>
          <div class="imagePre">
            <img
              v-for="item in contentObj.imageList"
              :key="item.id"
              :src="item.url"
            >
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      contentObj: {}
    }
  },
  async created() {
    const { id } = this.$route.query
    this.$get('/web/feedback/get', { id }).then(res => {
      console.log(res)
      if (res.data.code === '0') {
        this.contentObj = res.data.data
      }
    })
  }
}
</script>
 <style scoped>
.wraper {
  margin: 0 20px;
  display: flex;
  margin-top: 50px;
  justify-content: space-between;
}

.wraper .title {
  font-size: 24px;
  font-weight: bold;
}

.content {
  border: 1px solid #f1f1f1;
  /* margin-top: 15px; */
  margin: 15px 15px;
}

.content ul {
  margin: 20px 40px;
}

.content ul li {
  margin-bottom: 18px;
}

.content ul li label {
  color: #aaaaaa;
  display: inline-block;
  width: 180px;
}

.imagePre {
  display: inline-block;
}

.imagePre img {
  width: 68px;
  height: 72px;
}
</style>
